<template>
    <fieldset>
        <legend>defineApi组件</legend>
        <parentCom></parentCom>
    </fieldset>
</template>
<script setup>
// definProps defineEmits defineExpose
import childCom from "./child.vue"
import parentCom from "./Parent.vue"
import { onErrorCaptured } from "vue";

onErrorCaptured((err, instance, info) => {
    console.log('err====',err.toString())
    console.log('instance====',instance)
    console.log('info===',info)
    //可以阻止子组件错误的传播
    return false
})
</script>